import fetch from 'utils/fetch';

//查询业务员
export function salesmanList(data) {
  return fetch({
    url: 'api/admin/salesman/screenSelectSalesman',
    method: 'post',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
    data
  });
}

//新增业务员
export function salesmanAdd(data) {
  return fetch({
    url: 'api/admin/salesman/insertSelective',
    method: 'post',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
    data
  });
}

//验证业务员编号
export function validateSalesmanNum(salesmanNumber) {
  return fetch({
    url: 'api/admin/salesman/getSalesmanNumberFindSalesman/' + salesmanNumber,
    method: 'get',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
  });
}

//修改业务员信息
export function modifySalesman(data) {
  return fetch({
    url: 'api/admin/salesman/updateSalesman',
    method: 'post',
    headers: {'Content-type': 'application/json;charset=UTF-8'},
    data
  });
}